Two optimizations for icon cache lookups.
authorMatthias Clasen <mclasen@redhat.com>
Mon, 3 Dec 2007 17:44:27 +0000 (17:44 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 3 Dec 2007 17:44:27 +0000 (17:44 +0000)
commitf9e4618bdae4adce0e675f54dd6ebf9a48be76e4
tree6b88d124474785093218846f3c6ec49df950c7fa
parentf83588f87e9ae756016073e80f3cfc6187d8a816
Two optimizations for icon cache lookups.

2007-12-03  Matthias Clasen  <mclasen@redhat.com>

        Two optimizations for icon cache lookups.

        * gtk/gtkiconcache.[hc]:
        * gtk/gtkicontheme.c: Remember the directory index for
        subdirectories, instead of running over the directory list
        again and again.

        * gtk/gtkiconcache.c (find_image_offset): Remember the last
        chain and try it first; this helps with the the usage patterns
        in gtkicontheme.c, where the same icon is queried for a lot
        of subdirectories.

svn path=/trunk/; revision=19099
ChangeLog
gtk/gtkiconcache.c
gtk/gtkiconcache.h
gtk/gtkicontheme.c